package jk;

public class digui {

    public static void main(String[] args){
        System.out.println(digui0(5));
        System.out.println(digui1(5));
        System.out.println(digui2(5,2));
    }

    public static int digui0(int n){
        if(n>1){
            n = n*digui0(n-1);
        }
        return n;
    }

    public static int digui1(int n){
        if(n>0){
            n=n+digui1(n-1);
        }
        return n;
}

    public static int digui2(int n,int m){
        if(m>0 && m<n){
            return digui2(n-1,m-1)+digui2(n-1,m);
        }
        return 1;
    }
}
